#include <QtGui>

#include "diagramitem.h"
#include "propertiesdiagram2.h"

PropertiesDiagram2::PropertiesDiagram2(DiagramItem *item, QWidget *parent)
    : QDialog(parent)
{
    setupUi(this);

    this->item = item;
	//notesTextEdit->setText(item->notes);
    xSpinBox->setValue(int(item->scenePos().x()));
    ySpinBox->setValue(int(2000 - item->scenePos().y()));
	spinBox_w->setValue(int(item->width)); 
	spinBox_h->setValue(int(item->height)); 

}

void PropertiesDiagram2::on_buttonBox_accepted()
{
    item->setPos(xSpinBox->value(), 2000 - ySpinBox->value());
	item->setWidthHeight(spinBox_w->value(), spinBox_h->value());
	//item->notes = notesTextEdit->toPlainText();

    item->update();
    QDialog::accept();
}




